import { UserState } from "./userReducer";
export const LOGIN_SUCCESS = "LOGIN_SUCCESS";
export const LOGIN_QUIT = "LOGIN_QUIT";
interface LoginSuccessAction {
  type: typeof LOGIN_SUCCESS;
  payload: UserState;
}
export function loginSuccessActionCreator(
  payload: UserState
): LoginSuccessAction {
  return { type: LOGIN_SUCCESS, payload };
}
interface LoginQuitAction {
  type: typeof LOGIN_QUIT;
}
export function LoginQuitActionCreator(): LoginQuitAction {
  return { type: LOGIN_QUIT };
}
export type UserAction = LoginSuccessAction | LoginQuitAction;
